import http from "@/api";
import { ComapnySpendConfigEntity, ComapnySpendConfigFlagEntity } from "@/biz/interface/JobType";

import { ModuleCommonUrl, ModuleMainUrl } from "..";

const moduleUrl = ModuleCommonUrl;

const mainModuleUrl = ModuleMainUrl;

// * 详情工作接口
export const getAddressAllTreeApi = (params: {}) => {
  return http.post(moduleUrl + `/comapi/adstreestr`, params);
};

// * 详情工作接口
export const getAreaConfigedFlagApi = (params: {}) => {
  return http.post<ComapnySpendConfigFlagEntity>(mainModuleUrl + `/job/configareaflaginfo`, params);
};

// * 获取区域的配置信息
export const getAreaConfigInfoApi = (params: { areaId: string }) => {
  return http.post<ComapnySpendConfigEntity>(mainModuleUrl + `/job/configinfo`, params);
};

// * 保存区域的配置信息
export const saveAreaConfigApi = (params: {}) => {
  return http.post(mainModuleUrl + `/job/configsave`, params);
};
